package edu.dayu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import edu.dayu.domain.Student;
import edu.dayu.domain.vo.StudentVO;
import edu.dayu.service.StudentService;
import edu.dayu.mapper.StudentMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86134
* @description 针对表【student】的数据库操作Service实现
* @createDate 2023-03-03 11:24:39
*/
@Service
@Slf4j
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student>
    implements StudentService{
    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> queryStudentAll(Student student) {
        return studentMapper.queryStudentAll(student);
    }

    @Override
    public List<Student> testQuery(Student student) {
        QueryWrapper<Student> queryWrapper = new QueryWrapper<Student>().eq("name", student.getName());
        return baseMapper.testQuery(queryWrapper);
    }

    @Override
    public List<StudentVO> queryStudentCou(StudentVO studentVO) {
        QueryWrapper<StudentVO> queryWrapper = new QueryWrapper<StudentVO>().eq("name", studentVO.getName());
        return baseMapper.selectStudentCou(queryWrapper);
    }

    @Override
    public void logTest() {
        log.info("日志测试11111");
    }
}




